package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the CONNECTOR_SELECT database table.
 * 
 */
@Entity
@Table(name="CONNECTOR_SELECT")
@NamedQuery(name="ConnectorSelect.findAll", query="SELECT c FROM ConnectorSelect c")
public class ConnectorSelect implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="CONNECTOR_SELECT_CONNECTORSELECTID_GENERATOR" )
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CONNECTOR_SELECT_CONNECTORSELECTID_GENERATOR")
	@Column(name="CONNECTOR_SELECT_ID")  
	private long connectorSelectId;

	@Column(name="CONNECTOR_SELECT_GETVALUE")
	private String connectorSelectGetvalue;

	//bi-directional many-to-one association to ConnectorStateDetail
	@OneToMany(mappedBy="connectorSelect")
	private List<ConnectorStateDetail> connectorStateDetails;

	public ConnectorSelect() {
	}

	public long getConnectorSelectId() {
		return this.connectorSelectId;
	}

	public void setConnectorSelectId(long connectorSelectId) {
		this.connectorSelectId = connectorSelectId;
	}

	public String getConnectorSelectGetvalue() {
		return this.connectorSelectGetvalue;
	}

	public void setConnectorSelectGetvalue(String connectorSelectGetvalue) {
		this.connectorSelectGetvalue = connectorSelectGetvalue;
	}

	public List<ConnectorStateDetail> getConnectorStateDetails() {
		return this.connectorStateDetails;
	}

	public void setConnectorStateDetails(List<ConnectorStateDetail> connectorStateDetails) {
		this.connectorStateDetails = connectorStateDetails;
	}

	public ConnectorStateDetail addConnectorStateDetail(ConnectorStateDetail connectorStateDetail) {
		getConnectorStateDetails().add(connectorStateDetail);
		connectorStateDetail.setConnectorSelect(this);

		return connectorStateDetail;
	}

	public ConnectorStateDetail removeConnectorStateDetail(ConnectorStateDetail connectorStateDetail) {
		getConnectorStateDetails().remove(connectorStateDetail);
		connectorStateDetail.setConnectorSelect(null);

		return connectorStateDetail;
	}

	public ConnectorSelect(long connectorSelectId, String connectorSelectGetvalue) {
		super();
		this.connectorSelectId = connectorSelectId;
		this.connectorSelectGetvalue = connectorSelectGetvalue;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ConnectorSelect [connectorSelectId=" + connectorSelectId + ", connectorSelectGetvalue="
				+ connectorSelectGetvalue + "]";
	}
	
	
	
	
	

	public ConnectorSelect(long connectorSelectId, String connectorSelectGetvalue,
			List<ConnectorStateDetail> connectorStateDetails) {
		super();
		this.connectorSelectId = connectorSelectId;
		this.connectorSelectGetvalue = connectorSelectGetvalue;
		this.connectorStateDetails = connectorStateDetails;
	}
	          
	 
	
	
	
	

}